<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>
   <!--<audio src="./好自为之.mp3" controls title="好自为之" autoplay loop="2"></audio>-->
   <!-- controls 显示播放器界面 autoplay 进入页面自动播放 loop 重复次数-->
   <audio controls = "controls" autoplay="autoplay" id="audio"></audio>
</body>
<script>
    var audio = document.getElementById('audio');
    audio.src = "./后会无期.mp3"
    audio.onended = function () {
        alert("over");
    }
</script>
</html>